<!DOCTYPE html>
<html>
<head>
<title>审批配置</title>
#parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			#if($shiro.hasPermission("actassign:save"))
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			#end
		<!--	#if($shiro.hasPermission("actassign:update"))
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			#end-->
			#if($shiro.hasPermission("actassign:delete"))
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			#end
			<a class="btn btn-primary" @click="dtlInfo"><i class="fa fa-plus"></i>&nbsp;显示明细</a>
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

	<div v-show="showtable">
		<div class="panel panel-default">
			<div class="panel-heading">明细</div>
			<table id="jqGridTable"></table>
			<div id="jqGridPagerTable"></div>
		</div>
	</div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
			   	<div class="col-sm-2 control-label">流程名</div>
			   	<div class="col-sm-10">
					<select v-model="actAssign.processName" class="form-control" @change="processChange(actAssign.processName)">
						<option v-for="processName in dictList" :value="processName.value">{{processName.label}}</option>
					</select>
			      <!--<input type="text" class="form-control" v-model="actAssign.processName" placeholder="流程名"/>-->
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">条件概括</div>
			   	<div class="col-sm-10">
			      <input type="text" id='conddesc' class="form-control" v-model="actAssign.conddesc" placeholder="条件概括"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">最小值</div>
			   	<div class="col-sm-10">
			      <input type="text"  id='min' class="form-control" v-model="actAssign.min" placeholder="最小值"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">最大值</div>
			   	<div class="col-sm-10">
			      <input type="text" id='max'  class="form-control" v-model="actAssign.max" placeholder="最大值"/>
			    </div>
			</div>
			<!--						<div class="form-group">
			   	<div class="col-sm-2 control-label">单位</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="actAssign.unit" placeholder="单位"/>
			    </div>
			</div>-->

			<div class="form-group">
				<div class="panel panel-default">
					<div class="panel-heading">流程配置明细</div>

					<input type="button" class="btn btn-primary" @click="addCertificateItem" value="增加">
					<template v-for="(actAssigndtl, index) in actAssigndtlList ">
						<div class="form-group">
							<div class="col-sm-1 control-label">类别</div>
							<div class="col-sm-2">
								<label class="radio-inline"><input type="radio" v-model="actAssigndtl.type" value="0"/>主管</label>
								<label class="radio-inline"><input type="radio" v-model="actAssigndtl.type" value="1"/>指定人</label>
							</div>

							<div class="col-sm-1 control-label">姓名</div>
							<div class="col-sm-2">
								<input type="text" class="form-control" readonly="readonly"  @click='popUser(index)' v-model="actAssigndtl.username" placeholder="姓名"/>
							</div>
							<input type="button" class="btn btn-del" @click="delCertificateItem(index)" value="删除">
						</div>

					</template>
				</div>
			</div>


							<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>


<!-- 弹出选择用户 -->
<div id="popUser" style="display: none;padding:10px;">
	<form id="formSearch" class="form-horizontal">
		<div class="form-group" >
			<label class="control-label col-sm-1" style="width: 120px" for="popUser_name">姓名 </label>
			<div class="col-sm-2">
				<input type="text" class="form-control" id="popUser_name">
			</div>
			<div class="col-sm-1" style="text-align:center;">
				<button type="button"  id="find_btn" @click="searchByName" class="btn btn-primary">查询</button>
			</div>
		</div>
	</form>
	<table id="popUserGrid"></table>
	<div id="popUserGridPager"></div>
</div>

<script src="${rc.contextPath}/js/workflow/actassign.js?_${date.systemTime}"></script>
</body>
</html>